/**
 * 2020.05.28 by lyt 优化
 * 修改一下配置时，需要每次都清理 `window.localStorage` 浏览器永久缓存，配置才会生效
 */
const themeConfigModule = {
	namespaced: true,
	state: {
		themeConfig: {
			"isDrawer": false,
			"primary": "#3a3ef4",
			"isIsDark": false,
			"topBar": "#ffffff",
			"topBarColor": "#606266",
			"menuBar": "#3a3ef4",
			"menuBarColor": "#eaeaea",
			"columnsMenuBar": "#3a3ef4",
			"columnsMenuBarColor": "#e6e6e6",
			"isCollapse": false,
			"isUniqueOpened": true,
			"isFixedHeader": true,
			"isShowLogo": true,
			"isBreadcrumb": true,
			"isBreadcrumbIcon": false,
			"isTagsview": true,
			"isTagsviewIcon": false,
			"isCacheTagsView": true,
			"isFooter": true,
			"isGrayscale": false,
			"isInvert": false,
			"tagsStyle": "tags-style-one",
			"animation": "slide-right",
			"columnsAsideStyle": "columns-round",
			"columnsAsideLayout": "columns-vertical",
			"layout": "columns",
			"globalTitle": "帮帮数字环保平台",
			"globalViceTitle": "苏州甪泽环保科技有限公司",
			"globalViceDes": "帮帮数字环保平台",
			"globalI18n": "zh-cn",
			"globalComponentSize": "small"
		}
	},
	mutations: {
		// 设置布局配置
		getThemeConfig(state, data) {
			state.themeConfig = data;
		},
	},
	actions: {
		// 设置布局配置
		setThemeConfig({
			commit
		}, data) {
			commit('getThemeConfig', data);
		},
	},
};

export default themeConfigModule;